{% load i18n %}

<h2>{% trans 'Articles' %}</h2>
{% if results %}
  <ul class="articles-results">
    {% for article in results %}
      <li article-slug="{{ article.slug }}">
        <h4><a href="{% url 'article' article.slug %}">{{ article.title }}</a></h4>
        <div class="info">
          <span class="date">
            <span class="glyphicon glyphicon-calendar"></span>
            {{ article.create_date }}
          </span>
          <span class="user">
            <a href="{% url 'profile' article.create_user.username %}"><img src="{{ article.create_user.profile.get_picture }}"></a>
            <a href="{% url 'profile' article.create_user.username %}">{{ article.create_user.profile.get_screen_name }}</a>
          </span>
        </div>
        <div class="article-content">{{ article.get_summary_as_markdown|safe }}</div>
      </li>
    {% endfor %}
  </ul>
{% else %}
  <h4 class="no-result">{% trans 'No article found' %} :(</h4>
{% endif %}